[#include "/WEB-INF/pages/common/taglibs.ftl"]
[#--通过宏,递归树--]
		<ul>
			[#if tree ??]
				[@buildNode child=tree.getChilds() parent=tree /]
			[/#if]
		</ul>	
		[#macro buildNode child parent]
			<li ckey="${parent.id}" pkey="${parent.pid}" sfId="${parent.functionId}" item-expanded='true' item-checked='[#list roleFunctionList as rf][#if rf.function.id==parent.function.id && rf.enabled]true[/#if][/#list]'>
				<a href="javascript:void(0)" ckey="${parent.id}" pkey="${parent.pid}" item-folder="${parent.getChilds()??}">
					<img style='float: left; margin-right: 5px;' class="[#if parent.getChilds()??]icon-folder-open[#else]icon-file[/#if]" />
				 	<span item-title="true">${parent.function.name}</span>
				</a>
		    [#if child?? && child?size gt 0]
				<ul>
				[#list child as t]
					[#if t.getChilds()?? && t.getChilds()?size gt 0]
						[@buildNode child=t.getChilds() parent=t/]
					[#else]
						[#--不存在儿子节点,则不需要递归,只生成父亲节点数据--]
						<li ckey="${t.id}" pkey="${t.pid}" sfId="${t.functionId}"  item-checked='[#list roleFunctionList as rf][#if rf.function.id==t.function.id && rf.enabled]true[/#if][/#list]'>
							<a href="javascript:void(0)" ckey="${t.id}" pkey="${t.pid}" item-folder="[#if t.getChilds()??]true[#else]false[/#if]"> <img style='float: left; margin-right: 5px;' class="[#if t.getChilds()??]icon-folder-open[#else]icon-file[/#if]" />
								<span item-title="true">${t.function.name}</span>
							</a>
						</li>
					[/#if] 
				[/#list]
				</ul>
		    [/#if]
		    </li>
		[/#macro]

